package cn.tx.构造方法;

/**
 * @Package: cn.tx.构造方法
 * @Description: 类作用描述
 * @Author Mxb
 * @CreateDate 2020/10/17 8:37
 * @Version 1.0
 */
public class StudentDemo1 {
    public static void main(String[] args) {
        //创建对象
        Student1 s1 = new Student1();
        s1.show();

        //public Student(String name)
        Student1 s2 = new Student1("林青霞");
        s2.show();

        //public Student(int age)
        Student1 s3 = new Student1(30);
        s3.show();

        //public Student(String name,int age)
        Student1 s4 = new Student1("林青霞", 30);
        s4.show();
    }
}
